import Vue from 'vue'
import Router from 'vue-router'

import Login from "@/views/Login"
import Home from "@/views/Home"
import Root from "@/views/Root"
import SystemConfig from "@/views/SystemConfig"
import StaticAnalyse from "@/views/StaticAnalyse"
import TaskList from "@/views/TaskList"
import InstitutionsManage from "@/views/manage/InstitutionsManage"
import EmployeeManage from "@/views/manage/EmployeeManage"
import LibManage from "@/views/manage/LibManage"
import SystemManage from "@/views/manage/SystemManage"
import UserManage from "@/views/manage/UserManage"
import InfoManage from "@/views/manage/InfoManage"
import BusinessManage from "@/views/manage/BusinessManage"
import ProductionManage from "@/views/manage/ProductionManage"
import ContractManage from "@/views/manage/ContractManage"
import JGLoggerManage from "@/views/manage/JGLoggerManage"
import BookingManage from "@/views/manage/BookingManage"
import SystemLogger from "@/views/logger/SystemLogger"
import AfterSalesLogger from "@/views/logger/AfterSalesLogger"
import SysInfoNotice from "@/views/SysInfoNotice"

Vue.use(Router);

export default new Router({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes: [
        {
            path: '/',
            name: 'Login',
            component: Login
        },
        {
            path: '/Root',
            name: 'Root',
            component: Root,
            redirect: 'Root/Home',
            children: [
                {
                    path: 'Home',
                    name: 'Home',
                    component: Home,
                },
                {
                    path: 'InstitutionsManage',
                    name: 'InstitutionsManage',
                    component: InstitutionsManage,
                    redirect: 'InstitutionsManage/InfoManage',
                    children: [
                        {
                            path: 'InfoManage',
                            name: 'InfoManage',
                            component: InfoManage
                        },
                        {
                            path: 'BusinessManage',
                            name: 'BusinessManage',
                            component: BusinessManage
                        },
                        {
                            path: 'ProductionManage',
                            name: 'ProductionManage',
                            component: ProductionManage
                        },
                        {
                            path: 'ContractManage',
                            name: 'ContractManage',
                            component: ContractManage
                        },
                        {
                            path: 'LoggerManage',
                            name: 'LoggerManage',
                            component: JGLoggerManage
                        },
                        {
                            path: 'BookingManage',
                            name: 'BookingManage',
                            component: BookingManage
                        },
                        {
                            path: 'AfterSalesLogger',
                            name: 'AfterSalesLogger',
                            component: AfterSalesLogger
                        },
                        {
                            path: 'TaskList',
                            name: 'TaskList',
                            component: TaskList
                        }
                    ]
                },
                {
                    path: 'EmployeeManage',
                    name: 'EmployeeManage',
                    component: EmployeeManage
                },
                {
                    path: 'LibManage',
                    name: 'LibManage',
                    component: LibManage
                },
                {
                    path: 'SystemManage',
                    name: 'SystemManage',
                    component: SystemManage
                },
                {
                    path: 'StaticAnalyse',
                    name: 'StaticAnalyse',
                    component: StaticAnalyse
                },
                {
                    path: 'UserManage',
                    name: 'UserManage',
                    component: UserManage
                },
                {
                    path: 'SystemConfig',
                    name: 'SystemConfig',
                    component: SystemConfig
                },
                {
                    path: 'SystemLogger',
                    name: 'SystemLogger',
                    component: SystemLogger
                },
                {
                    path: 'SysInfoNotice',
                    name: 'SysInfoNotice',
                    component: SysInfoNotice
                }
            ]
        },
        {
            path: '/',
            name: 'SafeExit',
            component: Login
        }
    ]
})
